{% set form = hookable_metadata.context.form %}

{% if form.calculator.vars.value is not empty %}
    <div class="col-12" {{ sylius_test_html_attribute('calculator-configuration') }}>
        {% if form.configuration is defined %}
            {{ form_row(form.configuration) }}
        {% else %}
            {% for name, calculator_configuration_prototype in form.vars.prototypes %}
                {% set chosen_calculator = 'calculators_' ~ form.calculator.vars.value %}
                {% if chosen_calculator == name %}
                    {{ form_row(calculator_configuration_prototype) }}
                {% endif %}
            {% endfor %}
        {% endif %}
    </div>
{% endif %}
